<div class="box box-category box-account">
  <?php 
    if(isset($_GET['route']))
    {
    $b_login = 0;
    $b_register = 0;
    $b_account = 0; 
    $b_forgotten = 0; 
    $b_edit = 0;  
    $b_password = 0;  
    $b_payment = 0; 
    $b_tracking = 0;  
    $b_transaction = 0; 
    
    switch($_GET['route']){
      case 'affiliate/login':     $b_login = 1;     break;    
      case 'affiliate/register':    $b_register = 1;    break;    
      case 'affiliate/account':   $b_account = 1;     break;  
      case 'affiliate/forgotten':   $b_forgotten = 1;     break;  
      case 'affiliate/edit':      $b_edit = 1;      break;  
      case 'affiliate/password':    $b_password = 1;    break;
      case 'affiliate/payment':   $b_payment = 1;     break;    
      case 'affiliate/tracking':    $b_tracking = 1;    break;  
      case 'affiliate/transaction': $b_transaction = 1;   break;    
    }
    }
?>
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <ul>
      <?php if (!$logged) { ?>
      <li <?php echo ($b_login==1 ? 'class="active"' : ''); ?>><a href="<?php echo $login; ?>"><?php echo $text_login; ?></a></li>
    <li <?php echo ($b_register==1 ? 'class="active"' : ''); ?>><a href="<?php echo $register; ?>"><?php echo $text_register; ?></a></li>
      <li <?php echo ($b_forgotten==1 ? 'class="active"' : ''); ?>><a href="<?php echo $forgotten; ?>"><?php echo $text_forgotten; ?></a></li>
      <?php } ?>
      <li <?php echo ($b_account==1 ? 'class="active"' : ''); ?>><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
      <?php if ($logged) { ?>
      <li <?php echo ($b_edit==1 ? 'class="active"' : ''); ?>><a href="<?php echo $edit; ?>"><?php echo $text_edit; ?></a></li>
      <li <?php echo ($b_password==1 ? 'class="active"' : ''); ?>><a href="<?php echo $password; ?>"><?php echo $text_password; ?></a></li>
      <?php } ?>
      <li <?php echo ($b_payment==1 ? 'class="active"' : ''); ?>><a href="<?php echo $payment; ?>"><?php echo $text_payment; ?></a></li>
      <li <?php echo ($b_tracking==1 ? 'class="active"' : ''); ?>><a href="<?php echo $tracking; ?>"><?php echo $text_tracking; ?></a></li>
      <li <?php echo ($b_transaction==1 ? 'class="active"' : ''); ?>><a href="<?php echo $transaction; ?>"><?php echo $text_transaction; ?></a></li>
      <?php if ($logged) { ?>
      <li><a href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a></li>
      <?php } ?>
    </ul>
  </div>
</div>
